package com.example.alee.ALeeSpringWeb.service;

import org.apache.catalina.core.StandardEngine;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.StringJoiner;

@Service
public class HelloService {

    // @Value($app.name=)


    @Value("${app.name}")
    private String appName;

    @Value("${app.owner}")
    private String appOwner;

    @Value("${app.port:8001}")
    private String appPort;


    public void printValue() {
        StringJoiner stringJoiner = new StringJoiner(",");
        stringJoiner.add(appName).add(appOwner).add(appPort);

        System.out.println("resurlt: " + stringJoiner);
    }
}
